Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/control service object status #2912

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

carpawell
Copy link
Member

No description provided.

Copy link

codecov bot commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 2.21774% with 485 lines in your changes missing coverage. Please review.

Project coverage is 23.53%. Comparing base (73e8414) to head (c4fda9d).

Files Patch % Lines
pkg/services/control/service.pb.go 4.01% 263 Missing ⚠️
pkg/services/control/service_neofs.pb.go 0.00% 90 Missing ⚠️
pkg/services/control/server/object_status.go 0.00% 50 Missing ⚠️
cmd/neofs-cli/modules/control/objects.go 0.00% 42 Missing ⚠️
pkg/services/control/service_grpc.pb.go 0.00% 20 Missing ⚠️
pkg/services/control/convert.go 0.00% 8 Missing ⚠️
pkg/services/control/rpc.go 0.00% 7 Missing ⚠️
cmd/neofs-cli/modules/control/root.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2912      +/-   ##
==========================================
- Coverage   23.75%   23.53%   -0.23%     
==========================================
  Files         774      776       +2     
  Lines       44866    45302     +436     
==========================================
  Hits        10660    10660              
- Misses      33356    33792     +436     
  Partials      850      850              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@cthulhu-rider cthulhu-rider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice overall

// resynchronized state when meta knows nothing about
// stored objects in blob; however, it is a control
// service, not a debug util
continue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC ur comment: if it is in write cache and/or blob storage, some info should be returned anyway. We can fallback this case to MISSING status for metabase

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it is in write cache and/or blob storage, some info should be returned anyway

that is why i left comment: i do not think we should search for a object if a metabase in this shard does not know it. this is not neofs-lens, it is a control service

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// can be reconsidered

what do u mean then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i meant somebody can disagree and we may change it in the future. if too many devs disagree now, may change it now

Copy link
Contributor

@cthulhu-rider cthulhu-rider Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let bs/wc aint in sync with mb - what output will be currently shown? And what GET would respond

Copy link
Member Author

@carpawell carpawell Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let bs/wc aint in sync with mb - what output will be currently shown?

if bs/wc has info, but metabase does not know about an object, it will be <empty response> currently

And what GET would respond

it really depends on the degree of resynchronization, it meta know absolutely nothing about an object, then it is 404:

if !exists {
return false, logicerr.Wrap(apistatus.ObjectNotFound{})
}

pkg/services/control/server/status.go Outdated Show resolved Hide resolved
pkg/services/control/server/status.go Outdated Show resolved Hide resolved
pkg/services/control/service.proto Outdated Show resolved Hide resolved
pkg/services/control/server/status.go Outdated Show resolved Hide resolved
pkg/services/control/server/status.go Outdated Show resolved Hide resolved
cmd/neofs-cli/modules/control/objects.go Outdated Show resolved Hide resolved
@carpawell carpawell force-pushed the feat/control-service-object-status branch 2 times, most recently from 9d9de7e to c64da4d Compare August 9, 2024 11:57
@carpawell carpawell force-pushed the feat/control-service-object-status branch from c64da4d to dd9291f Compare August 9, 2024 11:59
Includes API definition extending; server side implementation; protoc version
update (my local version is higher, and it seems we do not have a strict policy
about the version).
The command requests server's storage engine (bypass any other logical check,
only storage) to answer its status according to its parts (shards
and their write-caches, blobstors, metabases),

Signed-off-by: Pavel Karpy <[email protected]>
@carpawell carpawell force-pushed the feat/control-service-object-status branch from dd9291f to d1d6303 Compare August 9, 2024 12:09
It is the second command related to object operations, so additional `object`
subcommand seems reasonable, in the future, the others can be placed (move to)
here too.
Example:
```
▶ neofs-cli control object status --endpoint s01.neofs.devenv:8081 -w services/storage/wallet01.json --object EnCqHUUwS6vd2MENDe1MvjiXv9jADF8iA1vZimpjJpYt/AWUFtrRLU8NkPVyF3b5WjMXUe8awxPdHtNvSRpKqEaFq
Enter password >
Shard ID: 66cJzDxA4hqqF3YKFiqFyc
        metabase: AVAILABLE
        peapod: Path: "/storage/peapod1.db"
```
Closes #2886.

Signed-off-by: Pavel Karpy <[email protected]>
@carpawell carpawell force-pushed the feat/control-service-object-status branch from d1d6303 to c4fda9d Compare August 9, 2024 17:23
@roman-khimov roman-khimov merged commit 0cbd3d0 into master Aug 9, 2024
20 of 22 checks passed
@roman-khimov roman-khimov deleted the feat/control-service-object-status branch August 9, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants